import Vue from 'vue'
import Vuex from 'vuex'
import actions from './actions'
import getters from './getters'
import mutations from './mutations'
import state from './state'

Vue.use(Vuex)

export default new Vuex.Store({
    state,
    mutations,
    actions,
    getters
    /*
    // state: 用于保存全局共享的数据
    // 把默认播放器界面的显示和隐藏用全局变量来控制
    state: {
        isFullScreen: false
    },
    // mutations 用于保存修改全局共享的数据的方法
    mutations: {
        changeFullScreen(state, flag) {
            state.isFullScreen = flag
        }
    },
    // actions 用于保存触发 mutations 中保存的方法的方法
    actions: {
        setFullScreent({ commit }, flag) {
            commit('changeFullScreen', flag)
        }
    },
    getters: {
        isFullScreen(state) {
            return state.isFullScreen
        }
    }
    */
})